{# Layout modifications for the Pylit documentation #}
{# Filename: .templates/layout.html #}
{% extends '!layout.html' %}

<!-- Navigation bar				   -->
<!-- ============================================= -->
<!--						   -->
<!-- Add current page				   -->
<!-- Add up link				   -->

{%- block relbaritems %}
  <li>{{ title }}</li>
  <!-- <li>{{ pagename }}</li> -->
<!-- Does not work: places the up link on the next line    -->
  <!-- {% if parents %}								        -->
  <!--   <li class="right"><a href="{{ parents[-1].link }}">up</a> {{ reldelim2 }}</li> -->
  <!-- {% endif %}								        -->
{% endblock %}

<!-- use URL path separator as delimiter -->
{%- set reldelim1 = ' / ' %}


<!-- Sidebar                                       -->
<!-- ============================================= -->

<!-- Table Of Contents -->
<!-- ----------------- -->
<!--		       -->
<!-- Shorter heading   -->

{%- block sidebartoc %}
  {%- if display_toc %}
    <h3>Contents</h3>
    <!-- Contents of current page -->
    {{ toc }}
    <!-- Site Contents -->
    <!-- {{ toctree() }} -->
    <hr />
  {%- endif %}
{%- endblock %}


<!-- Links	       -->
<!-- ----------------- -->
<!--		       -->
<!-- Shorter headings  -->
<!-- Add Up link       -->

{%- block sidebarrel %}
  {%- if prev %}
    <h4>Previous Page</h4>
    <p class="topless">
      <a href="{{ prev.link|e }}" title="previous section">{{ prev.title }}</a>
    </p>
  {%- endif %}
  {%- if next %}
    <h4>Next Page</h4>
    <p class="topless">
      <a href="{{ next.link|e }}" title="next section">{{ next.title }}</a>
    </p>
  {%- endif %}
  {%- if pagename != "index" %}
    <h4>Up</h4>
    <p class="topless">
    {%- if parents %}
       <a href="{{ parents[-1].link|e }}" title="up">{{ parents[-1].title }}</a>
    {%- else %}
       <a href="{{ pathto('index') }}" title="up">{{ shorttitle }}</a>
    {%- endif %}
    </p>
  {%- endif %}
  <hr />
{%- endblock %}

<!-- Search                                        -->
<!-- --------------------------------------------- -->
<!-- smaller text area (size="12" instead of "18") -->

{%- block sidebarsearch %}
  {%- if pagename != "search" %}
    <h3>Search this site</h3>
    <form class="search" action="{{ pathto('search') }}" method="get">
      <input type="text" name="q" size="12" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    {%- if builder == 'web' %}
    <p style="font-size: 90%">Enter a module, class or function name.</p>
    {%- endif %}
  {%- endif %}
{%- endblock %}


<!-- Footer					   -->
<!-- --------------------------------------------- -->

{% block footer %}
 <p class="thanks">
  <!-- Thanks to	      -->
  <!-- for hosting this site. -->
 </p>
{% endblock %}
